package app.smutandati.amiscela;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.view.View.OnClickListener;

public class aMiscelaActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button btnCalcola = (Button) findViewById(R.id.btnCalcola);
        btnCalcola.setOnClickListener(this);
        
        
        
    }

	public void onClick(View arg0) {
		EditText txtBenza = (EditText) findViewById(R.id.txtBenza);
		TextView lblResult = (TextView) findViewById(R.id.lblResult);
		
		float num= Float.parseFloat(txtBenza.getText().toString());
		lblResult.setText(String.format("%.2f", num*0.2));
	}

}